package com.neu.elm.mapper;

import com.neu.elm.po.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @Author:csw
 * @Date: 10:29 2020/9/15
 */
@Mapper
public interface UserMapper {
    //登录（id+密码）
    @Select("select * from user where userId=#{userId} and password=#{password}")
    public User getUserByIdByPass(User user);

    //id统计个数
    @Select("select count(*) from user where userId=#{userId}")
    public int getUserById(String userId);

    //保存用户(1表示用户是否被激活)
    @Insert("insert into user values(#{userId},#{password},#{userName},#{userSex},null,1)")
    public int saveUser(User user);









    //注册

}
